﻿<header class="header">
    <div class="left">
        <a href="javascript:history.back();"><i class="fa fa-angle-left"></i></a>
    </div>
    <div class="tit">
        <h2>添加收货地址</h2>
    </div>
    <div class="right"></div>
</header>
<div class="account_info">
    <form name="AddAddressForm" ng-class="showOneError?'showerror':''">
        <ul id="account1" class="addressdiv">
            <li>
                <div class="edit_label">收货人:</div>
                <div class="edit_input"><input type="text" placeholder="真实姓名" ng-required="true" ng-model="Address.firstname" /></div>
            </li>
            <li>
                <div class="edit_label">手机号码:</div>
                <div class="edit_input"><input type="text" placeholder="手机号"  ng-required="true" ng-model="Address.telephone" ng-pattern="/^[1][358]\d{9}$/"/></div>
            </li>
            <li>
                <div class="edit_label">所在地区:</div>
                <div class="edit_input"><input type="text" placeholder="省市区" ng-click="AddressShow=true;ProvinceShow=true"  ng-required="true" ng-model="Address.format" /></div>
            </li>
            <li>
                <div class="edit_label">街道地址:</div>
                <div class="edit_input"><input type="text" placeholder="详细地址" ng-required="true" ng-model="Address.address_1"/></div>
            </li>
        </ul>
    </form>
</div>

<div class="gobuy_box"><a class="dh_btn" ng-click="SaveAddress()">保存地址</a></div>


<!--选择城市-->
<div ng-class="AddressShow?'ui_mask':'ui_mask d_hide'">
    <div class="ui_pop">
        <div class="mask_header">
            <span>选择所在地区</span>
            <div class="close" ng-click="AddressShow=false">
                <i class="ui-icon-close-page"></i>
            </div>
        </div>
        <!--选择省-->
        <div class="mask_content" ng-show="ProvinceShow">
            <div class="region_list">
                <ul>
                    <li ng-repeat="country in CountryList" ng-click="ChooseCountry(country)">{{country.name}}</li>
                </ul>
            </div>
        </div>
        <!--选择市-->
        <div class="mask_content" ng-show="CityShow">
            <div class="region_list">
                <ul>
                    <li ng-repeat="zone in ZoneList" ng-click="ChooseZone(zone)">{{zone.name}}</li>

                </ul>
            </div>
        </div>
        <!--选择县-->
        <div class="mask_content" ng-show="CountryShow">
            <div class="region_list">
                <ul>
                    <li ng-repeat="district in DistrictList" ng-click="ChooseDistrict(district)">{{district.name}}</li>
                </ul>
            </div>
        </div>
    </div>
</div>
